package com.qingcloud.adminbackend.mapper;

import com.qingcloud.adminbackend.entity.factor.SysSensorFactor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qingcloud.adminbackend.entity.sensor.SysSensorFactorConfigDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 设备传感器监测因子数据表 Mapper 接口
 * </p>
 *
 * @author luozehua
 * @since 2019-04-17
 */
public interface SysSensorFactorMapper extends BaseMapper<SysSensorFactor> {
    /**
     * 传感器绑定的监测因子
     *
     * @param sysSensorFactors
     */
    void insertSensorFactor(@Param("sysSensorFactors") List<SysSensorFactor> sysSensorFactors);

    /**
     * 传感器的监测因子
     *
     * @param equipmentId
     * @return
     */
    List<SysSensorFactorConfigDTO> findByEquipmentId(@Param("equipmentId") String equipmentId);
}
